package com.xpgk.mvc.ddc.query.vehicleQuery;

import java.util.List;

import com.xpgk.mvc.base.BaseController;
import com.xpgk.mvc.ddc.entity.Vehicle;
import com.xpgk.mvc.organization.Organization;

public class VehicleQueryController extends BaseController{
	
	public void index(){
		Organization org = Organization.dao.findById(getCUserOrganIds());
		setAttr("curOrgan", org);
		render("vehicleQuery.html");
	}
	
	public void getList(){
		String json = paging(splitPage, VehicleQuerySQL.sqlId_splitPageSelect, VehicleQuerySQL.sqlId_splitPageFrom);
		renderJson(json);
	}
	public void toDetail(){
		setAttr("ids", getPara("ids"));
		render("vehicleDetail.html");
	}
	public void busDetail(){
		String ids =  getPara("ids");
		List<Vehicle> b = Vehicle.dao.find("select * from DDC_VEHICLE where IDS = ?",ids);
		renderJson(b);
	}
	
}
